import {JSEncrypt} from "jsencrypt";

function encrypt(data, publicKey) {
    let encrypt = new JSEncrypt();
    encrypt.setPublicKey(publicKey);
    return encrypt.encrypt(data);
}

export default {
    encrypt
}
